Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
The cryptiles package is a utility library that provides various cryptographic functions. It is part of the hapi ecosystem and is designed to make certain security-related tasks easier for developers.
Random String Generation
Generates a cryptographically strong random string. The argument specifies the length of the string.
const Cryptiles = require('cryptiles');
const randomString = Cryptiles.randomString(32);
Fixed Time String Comparison
Compares two strings in constant time to prevent timing attacks. It returns true if the strings are equal, false otherwise.
const Cryptiles = require('cryptiles');
const a = 'some string';
const b = 'some string';
const comparisonResult = Cryptiles.fixedTimeComparison(a, b);
The built-in Node.js 'crypto' module provides a wide range of cryptographic functions, including random string generation and secure hashing. It is more comprehensive than cryptiles but also more complex to use.
bcryptjs is a package for hashing passwords using the bcrypt algorithm. It is similar to cryptiles in providing cryptographic functions but is specifically focused on password hashing and salting.
randombytes is a simple package that allows you to generate cryptographically strong random bytes. It is similar to the random string generation feature of cryptiles but does not include other cryptographic utilities.
General purpose crypto utilities
Lead Maintainer - Eran Hammer
randomString(<Number> size)
Returns a cryptographically strong pseudo-random data string. Takes a size argument for the length of the string.
randomDigits(<Number> size)
Returns a cryptographically strong pseudo-random data string consisting of only numerical digits (0-9). Takes a size argument for the length of the string.
FAQs
General purpose crypto utilities
We found that cryptiles demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.